In cryptography, some public key protocols for secure key exchange and digital signatures are based on the difficulty of the discrete logarithm problem in the underlying group. In that setting, groups such as the group of points on an elliptic curve or on the Jacobian of a genus-2 hyperelliptic curve may be used. The security of the system depends on the largest prime factor of the group order, and thus it is desirable to be able to construct curves such that the resulting group order is prime. There are a number of known techniques to generate genus-2 curves based on deterministically determined endomorphism rings. However, existing techniques to deterministically determine the endomorphism rings are typically computationally intensive and slow to execute.